<!--
 * @Descripttion: 是非题
 * @version: 
 * @Author: ada.wu
 * @Date: 2024-03-12 10:34:15
 * @LastEditors: ada.wu
 * @LastEditTime: 2024-04-10 18:56:09
-->
<template>
  <div class="p-lr-sm">
    <van-radio-group v-model="examSubjectDto.optionId" :disabled='disabled'>
      <template v-for="(item,i) in examSubjectDto.moduleOptionList">
        <van-radio :name="item.optionId">
          {{item.optionsName}}
          <template #icon="props">
            <img width="22" class="v-m" :src="props.checked ? getAssets('employee/check.svg') : getAssets('employee/radio.svg')" />
          </template>
        </van-radio>
        <van-field v-if="item.canInput=='1'&&examSubjectDto.optionId==item.optionId" :placeholder="'请输入'+item.optionsName" v-model="item.remark" />
      </template>
    </van-radio-group>
  </div>
</template>
<script lang="ts">
import { defineComponent, toRefs } from "vue";
import { RadioGroup, Radio } from "vant";
export default defineComponent({
  props: {
    examSubjectDto: {
      type: Object,
      default: "",
    },
    disabled: {
      type: Boolean,
      default: false,
    },
  },
  components: {
    [Radio.name]: Radio,
    [RadioGroup.name]: RadioGroup,
  },
  setup(props, { emit }) {
    return {
      ...toRefs(props),
    };
  },
});
</script>

<style lang="scss" scoped>
::v-deep(.van-radio) {
  padding-bottom: 10px;
  &:last-child {
    padding-bottom: 0;
  }
}
::v-deep(.van-radio__label) {
  color: #555555 !important;
}
::v-deep(.van-radio__icon) {
  height: 22px;
}
::v-deep(.van-field) {
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1px solid #ffd000 !important;
  margin-bottom: 10px !important;
  padding: 0 !important;
}
</style>

